def delete_view(request,object_id,model):
	'''
	Usage:
	@login_required 
	def action_delete(request,object_id): 
		return delete_view(request, object_id, ActionItem) 
	'''
	obj = get_object_or_404(model,id=object_id)
	obj.delete()
	request.user.message_set.create(message='The %s was deleted' % model._meta.verbose_name )
	return HttpResponseRedirect("/")